'''
@project:pytest_demo_t174
@auther:skj
@file:run_all_testcases.py
@date:2022/11/21 16:56
@desc:
'''
import  os, shutil  #操作文件夹
import pytest
pytest.main(['-s'])
json_report='D:/Users/86155/pytest_demo_t174/reports/json_report'
html_report='D:/Users/86155/pytest_demo_t174/reports/html_report'
if os.path.isdir(json_report):
    shutil.rmtree(json_report)
pytest.main(['-v','--alluredir=%s' % json_report]) #显示生成报告日志信息
os.system('allure generate %s -o %s --clean' %(json_report,html_report))#python打开cmd执行dos命令
